Skip to content

fix: roundtrip of arch/platform in lock files#1124

Merged
wolfv merged 2 commits intoconda:mainfrom
wolfv:lockfile-roundtrip
Feb 28, 2025
Merged

fix: roundtrip of arch/platform in lock files#1124
wolfv merged 2 commits intoconda:mainfrom
wolfv:lockfile-roundtrip

Conversation

@wolfv
Copy link
Copy Markdown
Contributor

@wolfv wolfv commented Feb 28, 2025

We were filling in the arch and platform fields in the lockfile if they didn't come from the repodata, but we didn't serialize this information on the first go.

When loading the data from lockfile and re-serializing, we did write it out leading to roundtrip issues as noted in #1073

In this PR we just remove the writing of arch and platform.

}?;
// Convert back to Platform string which should correspond to known subdirs
Ok(plat.to_string())
match arch.parse::<Arch>() {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the previous function was not covering e.g. emscripten-wasm32 so I modernized it a bit.

Copy link
Copy Markdown
Collaborator

@baszalmstra baszalmstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@wolfv wolfv merged commit f02bcd3 into conda:main Feb 28, 2025
16 checks passed
@wolfv wolfv deleted the lockfile-roundtrip branch February 28, 2025 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants